#!/usr/bin/python -O

#
# 8trak Music Player
#
#
# This work is released under the GNU GPL, version 2 or later.
#

try:
	import psyco
	psyco.full()
except ImportError:
	pass

import sys,os
sys.path.append('../')
from Utils.kdeemul import *
from App import *
from Utils.Paths import *
from Services.Sharing import *

_version = "0.1.33"

about = KAboutData("8trak","8trak",_version,
	"8trak Music Player",
	KAboutData.License_GPL,"","","http://www.8trak.org/","bugs@8trak.org")
about.addAuthor("8trak Programming : Georgi Damyanov, Jule Slootbeek","","","")
about.addCredit("Lsongs",None,None,"http://www.lsongs.com")
about.addCredit("python",None,None,"http://www.python.org")
about.addCredit("PyQt",None,None,"http://www.riverbankcomputing.co.uk/pyqt")
about.addCredit("PyKDE",None,None,"http://www.riverbankcomputing.co.uk/pykde")
about.addCredit("Gstreamer",None,None,"http://www.gstreamer.freedesktop.org")
about.addCredit("LAME",None,None,"http://lame.sourceforge.net")
about.addCredit("Ogg Vorbis",None,None,"http://www.vorbis.com")
about.addCredit("cdrecord",None,None,"http://freshmeat.net/projects/cdrecord")
about.addCredit("cdparanoia",None,None,"http://www.xiph.org/paranoia")
about.addCredit("mpg321",None,None,"http://mpg321.sourceforge.net")
about.addCredit("id3lib",None,None,"http://id3lib.sourceforge.net")
about.addCredit("pyid3lib",None,None,"http://pyid3lib.sourceforge.net")
about.addCredit("sox",None,None,"http://sox.sourceforge.net")
about.addCredit("howl",None,None,"http://www.porchdogsoft.com")
about.addCredit("cdda2wav",None,None,"http://www.cdda2wav.de")
about.addCredit("daapd",None,None,"http://www.deleet.de/projekte/daap/daapd")
about.addCredit("slimp3",None,None,"http://www.slimdevices.com")
about.addCredit("albumart",None,None,"http://louhi.kempele.fi/~skyostil/projects/albumart")
about.addCredit("trm",None,None,"http://www.musicbrainz.org/")
about.addCredit("faad",None,None,"http://www.audiocoding.com/")

basePath() # grab base path before KCmdLineArgs eats it

KCmdLineArgs.init(sys.argv,about)
options = [( 'suspend' ,'Suspend all audio playback'),
			( 'resume', 'Resume audio playback'),
			('play', 'Play files after import'),
			( 'mp3beamer','MP3Beamer mode'),
			('+files', 'Files/URLs to import')
			]
KCmdLineArgs.addCmdLineOptions(options)
KUniqueApplication.addCmdLineOptions()

app = App(_version)

splash = KSplashScreen(QPixmap(art("splash.png")))
splash.show()
app.makeWindow(splash)
splash.finish(app.window)
splash = None

app.exec_loop()

Sharing.singleton().killTasks()

_theApplication = None
app.window = None
os._exit(0)

